package cn.rbac.service;

import cn.rbac.dao.imp.UserDaoImp;
import cn.rbac.model.User;

public class LoginService {
	
	private UserDaoImp userDao=new UserDaoImp();

	public User userLogin(User user){
		User tmpUser=userDao.getUserByName(user.getName());
//		System.out.println(user.getPassword());
		if(tmpUser!=null&&tmpUser.getPassword().equals(user.getPassword())){
//			System.out.println("JJ:"+tmpUser.getPassword()+"aa:"+user.getPassword());
			return tmpUser;
		}
		return null;
	}
}
